<script>

    // $('report').addEvent('click', function () {

    //     var begin_date = $('begin_date').get('value');
    //     var begin_date_objh = document.getElementsByName("_DTIME_[H][begin_date]")[0];
    //     var begin_date_h = begin_date_objh.options[begin_date_objh.selectedIndex].value;
    //     var begin_date_objm = document.getElementsByName("_DTIME_[M][begin_date]")[0];
    //     var begin_date_m = begin_date_objm.options[begin_date_objm.selectedIndex].value;
    //     begin_date = begin_date + " " + begin_date_h + ":" + begin_date_m;
    //     begin_date = new Date(begin_date).getTime();

    //     var end_date = $('end_date').get('value');
    //     var end_date_objh = document.getElementsByName("_DTIME_[H][end_date]")[0];
    //     var end_date_h = end_date_objh.options[end_date_objh.selectedIndex].value;
    //     var end_date_objm = document.getElementsByName("_DTIME_[M][end_date]")[0];
    //     var end_date_m = end_date_objm.options[end_date_objm.selectedIndex].value;
    //     end_date = end_date + " " + end_date_h + ":" + end_date_m;
    //     end_date = new Date(end_date).getTime();
        
    //     var orderform_bn = $('orderform_bn').get('value');
    //     var logi_name = $('logi_name').get('value');
    //     var name=$('name').get('value');
    //     window.location.href = 'index.php?app=wms&ctl=admin_recalcexpressfee&act=index';
   
    // });
</script>


<div class="tableform"> 
     <h3>快递费批量重算</h3>
<form  name="Searchform" action="index.php?app=wms&ctl=admin_recalcexpressfee&act=index" method="post" >
<{input type="hidden" name="query" id="query" value="query"}>
    <div class="division">
        <table width='100%' cellspacing="0" cellpadding="0" >
          <tr>
              <td>
                  店铺：
                    <select name="shop" id="shop">
                      <option value="">全部</option>
                      <{foreach from=$shopIds key=key item=val}>
                        <option value="<{$val.shop_id}>" <{if $val.shop_id ==$clearingtable.shop }>selected<{/if}>><{$val.shop_name}></option>
                      <{/foreach}>
                    </select>
                    </td>
                </tr>
                <tr>
              <td>
                  客户：
                    <select name="AXCustomer" id="AXCustomer">
                      <option value="">全部</option>
                      <{foreach from=$customers key=key item=val}>
                        <option value="<{$val.AXCustomer}>" <{if $val.AXCustomer ==$clearingtable.AXCustomer }>selected<{/if}>><{$val.customername}></option>
                      <{/foreach}>
                    </select>
                    </td>
                </tr>
              <tr>
              <td>
              
                客户编码：<{input type="text" name="AXCustomer_code" id="AXCustomer_code" value="{$clearingtable.AXCustomer_code}"}>
                    </td>
                </tr>
              <tr>
                    <td>
                        快递：
                        <select name="logi_name" id="logi_name">
                            <option value="">全部</option>
                            <{foreach from=$loginameList key=key item=val}>
                            <option value="<{$val.corp_id}>" <{if $val.corp_id ==$clearingtable.logi_name }>selected<{/if}>  >
                            <{$val.logi_name}>
                            </option>
                            <{/foreach}>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        仓库：
                        <select name="branchname" id="branchname">
                            <option value="">全部</option>
                            <{foreach from=$branch_list key=key item=val}>
                            <option value="<{$val.branch_id}>" <{if $val.branch_id ==$clearingtable.branchname }>selected<{/if}>  >
                            <{$val.name}>
                            </option>
                            <{/foreach}>
                        </select>
                    </td>
                </tr>

             <tr>
               <td>
                过数时间：
                <{input type="time" name="begin_date" vtype="required" id="begin_date" value="{$clearingtable.begin_date}" }>
                至：<{input type="time" value="{$clearingtable.end_date}"  id="end_date"  name="end_date"}>
                </td>
              </tr>


              <tr>
                <td>
                物料编码：<{input type="text" name="bn" id="bn" value="{$clearingtable.bn}"}>
                </td>
              </tr>
             <tr>
               <td>
                  区域不匹配：<input type="checkbox" name="isshiparea" id="isshiparea" <{if $clearingtable.isshiparea == on}>checked="checked"<{/if}> /> <b style="font-size:12px;color:red;">发货单区域与地区档案不匹配</b>                
                </td>
              </tr>
             <tr>
               <td>
                 应收为零：<input type="checkbox" name="arzero" id="arzero" <{if $clearingtable.arzero == on}>checked="checked"<{/if}> />&nbsp;                 
                 应付为零：<input type="checkbox" name="apzero" id="apzero" <{if $clearingtable.apzero == on}>checked="checked"<{/if}> />
                </td>
              </tr>
             <tr>
               <td>
                 重算应收：<input type="checkbox" name="arcalc" id="arcalc" <{if $clearingtable.arcalc == on}>checked="checked"<{/if}> />&nbsp;
                 重算应付：<input type="checkbox" name="apcalc" id="apcalc" <{if $clearingtable.apcalc == on}>checked="checked"<{/if}> />
                </td>
              </tr>
              <tr>
                <td>
                <{button class="btn btn-primary" type="submit"  id="saveCurrent" label="查询"}>
                <b style="font-size:12px;color:red;">重算（再次确认查询条件）</b><{input type="checkbox" name="iscalc" id="iscalc" }>
                </td>
              </tr>


        </table>

   </div>

</form>
<div id="accordion" style="width:600px;">
    <b>结果：</b>
        <table width="600px" cellspacing="0" cellpadding="0" class="gridlist">
            <thead>
            <tr>
                <th>总数</th>
                <th>成功</th>
                <th>失败（价格为0）</th>
            </tr>
            </thead>
            <tbody>
              <tr>
                  <td><b style="font-size:14px;color:black;"><{$resultdata.sumcount}></b></td>                  
                  <td><b style="font-size:14px;color:green;"><{$resultdata.succcount}></b></td>
                  <td><b style="font-size:14px;color:red;"><{$resultdata.failcount}></b></td>
              </tr>
            </tbody>
        </table>
   </div>
 </div>

